// [[ OnflowGenerator File UUID: 833303588c7b4e36b181fdf62d8ef4d2  ]]
package com.itdct.onflow.system.account.qo

import com.itdct.onflow.core.qo.BaseQo
import com.itdct.onflow.core.type.Add
import com.itdct.onflow.core.type.Update
import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import org.hibernate.validator.constraints.Length
import java.util.*

/**
 * @author DCTANT
 * @date 2025-09-01 15:11:24
 * @version 1.0
 * @description 系统账户编辑入参
 */
@Schema(name = "系统账户编辑入参", description = "系统账户编辑入参")
class SysAccountEditQo : BaseQo() {
    // [[ OnflowGenerator Range (- fields -) Start ]]
    @Schema(title = "账户名", example = "")
    @NotBlank(message = "请输入账户名", groups = [Add::class, Update::class])
    @Length(max = 50, message = "账户名不能超过50个字符", groups = [Add::class, Update::class])
    var name: String? = null

    @Schema(title = "账户UID", example = "")
    @Length(max = 64, message = "账户UID不能超过64个字符", groups = [Add::class, Update::class])
    var uid: String? = null

    @Schema(title = "昵称", example = "")
    @Length(max = 50, message = "昵称不能超过50个字符", groups = [Add::class, Update::class])
    var nickName: String? = null

    @Schema(title = "密码", example = "")
    @NotBlank(message = "请输入密码", groups = [Add::class])
    var password: String? = null

    @Schema(title = "性别", example = "")
    @NotNull(message = "请输入性别", groups = [Add::class, Update::class])
    var gender: Int = 30

    @Schema(title = "是否被锁定", example = "")
    var locked: Boolean? = null

    @Schema(title = "手机号", example = "")
    @Length(max = 32, message = "手机号不能超过32个字符", groups = [Add::class, Update::class])
    var mobile: String? = null

    @Schema(title = "邮箱", example = "")
    @Length(max = 50, message = "邮箱不能超过50个字符", groups = [Add::class, Update::class])
    var email: String? = null

    @Schema(title = "头像", example = "")
    @Length(max = 255, message = "头像不能超过255个字符", groups = [Add::class, Update::class])
    var avatar: String? = null

    @Schema(title = "国家", example = "")
    @Length(max = 20, message = "国家不能超过20个字符", groups = [Add::class, Update::class])
    var country: String? = null

    @Schema(title = "省份", example = "")
    @Length(max = 20, message = "省份不能超过20个字符", groups = [Add::class, Update::class])
    var province: String? = null

    @Schema(title = "城市", example = "")
    @Length(max = 20, message = "城市不能超过20个字符", groups = [Add::class, Update::class])
    var city: String? = null

    @Schema(title = "地址", example = "")
    @Length(max = 255, message = "地址不能超过255个字符", groups = [Add::class, Update::class])
    var address: String? = null

    @Schema(title = "生日", example = "")
    var birthday: Date? = null

    @Schema(title = "账户状态", example = "")
    var status: Int? = null

    @Schema(title = "微信号", example = "")
    @Length(max = 64, message = "微信号不能超过64个字符", groups = [Add::class, Update::class])
    var wx: String? = null

    @Schema(title = "QQ号", example = "")
    @Length(max = 32, message = "QQ号不能超过32个字符", groups = [Add::class, Update::class])
    var qq: String? = null

    @Schema(title = "备注信息", example = "")
    @Length(max = 2000, message = "备注信息不能超过2000个字符", groups = [Add::class, Update::class])
    var remark: String? = null

    @Schema(title = "账号过期时间", example = "")
    var expireTime: Date? = null

    @Schema(title = "锁定开始时间", example = "")
    var lockStartTime: Date? = null

    @Schema(title = "锁定结束时间", example = "")
    var lockEndTime: Date? = null

// [[ OnflowGenerator Range (- fields -) End ]]

    // INFO: Zhouwx: 2025/9/12 目前仅支持单角色
    @NotNull(message = "请选择角色", groups = [Add::class, Update::class])
    @Schema(title = "角色id")
    var roleId: Long? = null
}